﻿@model FinanceChecker.DataTransferObject.AlertSettingsViewModel

<div class="container">
    <div class="row justify-content-center mt-4">
        <div class="col-12 col-md-9">
            <div class="card">
                <div class="card-body">
                    <h4 class="card-title text-center">ALERT SETTINGS</h4>

                    <form asp-action="Index" method="post">
                        <div class="form-check form-switch">
                            <input class="form-check-input" type="checkbox" asp-for="HighBalanceAlertEnabled" id="highBalanceSwitch">
                            <label class="form-check-label" for="highBalanceSwitch">Enable High Balance Alert</label>
                        </div>

                        <div class="form-group">
                            <label asp-for="HighBalanceThreshold">Threshold Amount:</label>
                            <input type="number" asp-for="HighBalanceThreshold" class="form-control" step="0.01" value="@Model.HighBalanceThreshold.ToString("N2")" />
                        </div>

                        <div class="form-check form-switch">
                            <input class="form-check-input" type="checkbox" asp-for="LowBalanceAlertEnabled" id="lowBalanceSwitch">
                            <label class="form-check-label" for="lowBalanceSwitch">Enable Low Balance Alert</label>
                        </div>

                        <div class="form-group">
                            <label asp-for="LowBalanceThreshold">Threshold Amount:</label>
                            <input type="number" asp-for="LowBalanceThreshold" class="form-control" step="0.01" value="@Model.LowBalanceThreshold.ToString("N2")" />
                        </div>

                        <div class="form-check form-switch">
                            <input class="form-check-input" type="checkbox" asp-for="IncomeDepositedAlertEnabled" id="incomeDepositedSwitch">
                            <label class="form-check-label" for="incomeDepositedSwitch">Enable Income Deposited Alert</label>
                        </div>

                        <div class="form-check form-switch">
                            <input class="form-check-input" type="checkbox" asp-for="DueDateReminderAlertEnabled" id="dueDateReminderSwitch">
                            <label class="form-check-label" for="dueDateReminderSwitch">Enable Due Date Reminder</label>
                        </div>

                        <div class="form-check form-switch">
                            <input class="form-check-input" type="checkbox" asp-for="TargetAmountReachedAlertEnabled" id="targetamountSwitch">
                            <label class="form-check-label" for="targetamountSwitch">Enable Target Amount Reached Alert</label>
                        </div>

                        <button type="submit" class="btn btn-primary mt-3">Save Settings</button>
                        <br />
                        @Html.AntiForgeryToken()

                    </form>
                    <br />
                    @if (TempData["success"] != null)
                    {
                        <div class="alert alert-success mt-3">@TempData["success"]</div>

                    }
                    <br />
                </div>
            </div>
        </div>
        <br />
    </div>
    <br />
</div>
<br />
<br />